import { defineComponent, VNode, ref, watchEffect, onUnmounted } from 'vue'

/* scss */
import '@src/modules/intelligentQuality/views/newInfo/components/index.scss'

// 按钮组件
export default defineComponent({
    name: 'ControlButton',
    props: {
        num: {
            type: Number,
            default: 0
        }
    },
    emits: ['change'],
    setup(props, { emit }) {

        const handlerChangeNum = (num: number) => {
            emit('change', num)
        }

        return {
            handlerChangeNum
        }
    },
    render() {
        return (
            <div class="control-button">
                <el-input-number controls-position="right" value={this.num} min={0} max={100} onChange={this.handlerChangeNum}/>
            </div>
        ) as unknown as VNode
    }
})